package com.example.poemtest.mine;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.example.poemtest.Activity.BottomNavigationViewActivity;
import com.example.poemtest.R;
import com.example.poemtest.utils.FullScreenUtil;

/**
 * 设置页面
 */
public class SetupActivity extends AppCompatActivity implements View.OnClickListener {

    private LinearLayout SetupToPerson, SetupToSafe, SetupToMessage, SetupToUniversal, SetupToPersonCollect,
            SetupToPersonThree, SetupToAbout;
    private ImageView SetupToMine;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        FullScreenUtil.getInstance().fullScreen(this,true);
        setContentView(R.layout.activity_setup);
        //绑定控件对象
        setView();
    }

    /**
     * 绑定控件对象
     */
    private void setView() {
        SetupToMine = findViewById(R.id.setup_to_mine);
        SetupToMine.setOnClickListener(this);
        SetupToPerson = findViewById(R.id.setup_person);
        SetupToPerson.setOnClickListener(this);
        SetupToSafe = findViewById(R.id.setup_safe);
        SetupToSafe.setOnClickListener(this);
        SetupToMessage = findViewById(R.id.setup_message);
        SetupToMessage.setOnClickListener(this);
        SetupToUniversal = findViewById(R.id.setup_universal);
        SetupToUniversal.setOnClickListener(this);
        SetupToPersonCollect = findViewById(R.id.setup_person_collect);
        SetupToPersonCollect.setOnClickListener(this);
        SetupToPersonThree = findViewById(R.id.setup_person_three);
        SetupToPersonThree.setOnClickListener(this);
        SetupToAbout = findViewById(R.id.setup_about);
        SetupToAbout.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.setup_to_mine:
                //返回到我的页面
                Intent intent = new Intent(SetupActivity.this, BottomNavigationViewActivity.class);
                intent.putExtra("id",5);
                startActivity(intent);
                break;
            case R.id.setup_person:
                //跳转到个人信息
                Intent intent1 = new Intent(SetupActivity.this, PersonalMessageActivity.class);
                startActivity(intent1);
                break;
            case R.id.setup_safe:
                //跳转到账号与安全
                Intent intent7 = new Intent(SetupActivity.this, SetupSafe.class);
                startActivity(intent7);
                break;
            case R.id.setup_message:
                //跳转到消息与通知页面
                Intent intent8 = new Intent(SetupActivity.this, MessageAndRemaindActivity.class);
                startActivity(intent8);
                break;
            case R.id.setup_universal:
                //跳转到通用设置页面
                Intent intent6 = new Intent(this, UniversalSetupActivity.class);
                startActivity(intent6);
                break;
            case R.id.setup_person_collect:
                //跳转到个人信息搜集清单页面
                Intent intent4 = new Intent(this, PersonInformActivity.class);
                startActivity(intent4);
                break;
            case R.id.setup_person_three:
                //跳转到第三方信息共享页面
                Intent intent5 = new Intent(this, PersonThreeActivity.class);
                startActivity(intent5);
                break;
            case R.id.setup_about:
                //跳转到关于页面
                Intent intent2 = new Intent(this, AboutActivity.class);
                startActivity(intent2);
                break;
            default:
                break;

        }
    }
}